import { ComponentInternalInstance, getCurrentInstance } from "vue";
import { useRoute, useRouter } from "vue-router";
import { useStore } from "@/store";


function useGlobalAPI() {
  const router = useRouter();
  const route = useRoute();
  const store = useStore();

  const { appContext, proxy } = getCurrentInstance() as ComponentInternalInstance
  const { globalProperties } = appContext.config

  return {
    store,
    route,
    router,
    globalProperties,
    proxy,
  }
}
export default useGlobalAPI
